# GENERATED BY: test/dependency_services/dependency_services_test.dart

$ cat pubspec.yaml
{"name":"myapp","dependencies":{"foo":"^1.0.0","bar":{"path":"../bar"}},"environment":{"sdk":"^3.0.2"}}
$ cat pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  bar:
    dependency: "direct main"
    description:
      path: "../bar"
      relative: true
    source: path
    version: "1.0.0"
  foo:
    dependency: "direct main"
    description:
      name: foo
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.0.0"
sdks:
  dart: ">=3.0.2 <4.0.0"
-------------------------------- END OF OUTPUT ---------------------------------

## Section list
$ echo '' | dependency_services list
{
  "dependencies": [
    {
      "name": "bar",
      "version": "1.0.0",
      "kind": "direct",
      "constraint": "any",
      "source": {
        "type": "path",
        "description": {
          "path": "../bar",
          "relative": true
        }
      }
    },
    {
      "name": "foo",
      "version": "1.0.0",
      "kind": "direct",
      "constraint": "^1.0.0",
      "source": {
        "type": "hosted",
        "description": {
          "name": "foo",
          "url": "http://localhost:$PORT",
          "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
        }
      }
    }
  ]
}

-------------------------------- END OF OUTPUT ---------------------------------

## Section report
$ echo '' | dependency_services report
{
  "dependencies": [
    {
      "name": "bar",
      "version": "1.0.0",
      "kind": "direct",
      "source": {
        "type": "path",
        "description": {
          "path": "../bar",
          "relative": true
        }
      },
      "latest": "1.0.0",
      "constraint": "any",
      "compatible": [],
      "singleBreaking": [],
      "multiBreaking": []
    },
    {
      "name": "foo",
      "version": "1.0.0",
      "kind": "direct",
      "source": {
        "type": "hosted",
        "description": {
          "name": "foo",
          "url": "http://localhost:$PORT",
          "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
        }
      },
      "latest": "2.0.0",
      "constraint": "^1.0.0",
      "compatible": [],
      "singleBreaking": [
        {
          "name": "foo",
          "version": "2.0.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "fee5502506315776878d8556f0f041c9c5c552716db3b25fc43ce1f0175a992d"
            }
          },
          "constraintBumped": "^2.0.0",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.0.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
            }
          }
        }
      ],
      "multiBreaking": [
        {
          "name": "foo",
          "version": "2.0.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "fee5502506315776878d8556f0f041c9c5c552716db3b25fc43ce1f0175a992d"
            }
          },
          "constraintBumped": "^2.0.0",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.0.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "c35f6caa60870d3b6c5c6aebe5a5d4b56ca4733a52a80ded3445c0c5fa4b62df"
            }
          }
        }
      ]
    }
  ]
}

-------------------------------- END OF OUTPUT ---------------------------------

## Section apply
$ echo '{"dependencyChanges":[{"name":"foo","version":"2.0.0","constraint":"^2.0.0"}]}' | dependency_services apply
{"dependencies":[]}

-------------------------------- END OF OUTPUT ---------------------------------

$ cat pubspec.yaml
{"name":"myapp","dependencies":{"foo":^2.0.0,"bar":{"path":"../bar"}},"environment":{"sdk":"^3.0.2"}}
$ cat pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  bar:
    dependency: "direct main"
    description:
      path: "../bar"
      relative: true
    source: path
    version: "1.0.0"
  foo:
    dependency: "direct main"
    description:
      name: foo
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "2.0.0"
sdks:
  dart: ">=3.0.2 <4.0.0"
